package STUDENT.HOANGQUOCVIET.OOPs.Excercise02;

public class Models {
	/**
	 * TinhToan
	 * 
	 * @param objObject
	 *            bPhepTinh Case 0: Phép Cộng Case 1: Phép Trừ Case 2: Phép Nhân
	 *            Case 3: Phép Chia
	 * @return dResult
	 */
	public double TinhToan(Objects objObject) {
		switch (objObject.getbPhepTinh()) {
		case 0: {
			objObject.setdResult(objObject.getdNumA() + objObject.getdNumB());
			break;
		}
		case 1: {
			objObject.setdResult(objObject.getdNumA() - objObject.getdNumB());
			break;
		}
		case 2:{
			objObject.setdResult(objObject.getdNumA() * objObject.getdNumB());
			break;
		}
		case 3:{
			objObject.setdResult(objObject.getdNumA() / objObject.getdNumB());
			break;
		}
		}
		return objObject.getdResult();
	}

}
